import request from '@/utils/request'

// 查询岗位列表
export function listPosition(query) {
  return request({
    url: '/interview/position/list',
    method: 'get',
    params: query
  })
}

// 查询岗位详细
export function getPosition(id) {
  return request({
    url: '/interview/position/' + id,
    method: 'get'
  })
}

// 新增岗位
export function addPosition(data) {
  return request({
    url: '/interview/position',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updatePosition(data) {
  return request({
    url: '/interview/position',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delPosition(id) {
  return request({
    url: '/interview/position/' + id,
    method: 'delete'
  })
}

// 更改岗位状态
export function changeStatus(data){
  return request({
    url: '/interview/position/changeStatus',
    method: 'post',
    data: data
  })
}

export function positionTreeSelect(){
  return request({
    url: '/interview/position/listTree',
    method: 'get'
  })
}

export function listAllPostion(){
  return request({
    url: '/interview/position/listAll',
    method: 'get'
  })
}